#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);
    int k = 2;
    int sum = 0;
    for (int i = 0; i < n; i++) {
        sum += k;
        k += 3;
    }
    printf("%d", sum);
    return 0;
}